<--- %%NOBANNER%% --> wait.sas
 BackForward

/*-------------------<-- Start of Description-->---------------------\
| Force the system to wait for a couple of senconds: default is 2    |
| seconds;                                                           |
|---------------------<-- End of Description-->----------------------|
|--------------------------------------------------------------------|
|------------<-- Start of Files or Arguments Needed-->---------------|
| Argument:                                                          |
|    second: the number of seconds you want the system to wait;      |
|    default is 2 seconds;                                           |
|---------------<-- End of Files Arguments Needed-->-----------------|
|--------------------------------------------------------------------|
|------------------<-- Start of Files Created-->---------------------|
| Example: %openword;                                                |
|          %wait(3);                                                 |
|          %readword(...);                                           |
| Usage:   %wait(second);                                            |
\-------------------<-- End of Files Created-->---------------------*/
%macro wait/parmbuff;
/*--------------------------------------------\
| Author:   Duo Zhou;                         |
| Created:  2-27-2001 9:28pm;                 |
| Modified: 6-4-2001 10:11pm;                 |
| Purpose:  Force the SAS system sleep for a  |
|           couple of seconds;                |
\--------------------------------------------*/
%local waitid;
%let seconds=%qscan(&syspbuff,1,%str((),));
%if &seconds ne %then %do;
   %let waitid=%sysfunc(sleep(&seconds));
%end;
%else %do;
   %let waitid=%sysfunc(sleep(2));
%end;
%mend wait;